<template>
  <div class="navbar">
    <van-nav-bar title="网易严选" size="19px">
      <template #right>
        <van-icon name="search" size="25" @click="search" />
        <van-icon name="shopping-cart-o" size="25" @click="cart" />
      </template>
      <template #left>
        <van-icon name="home-o" size="25" @click="fun" />
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
export default {
  methods: {
    cart() {
      this.$router.push("/cart").catch((err) => {});
    },
    search() {
      this.$router.push("/search").catch((err) => {});
    },
    fun() {
      this.$router.push("/home");
    },
  },
};
</script>

<style >
.navbar .van-nav-bar__right {
  display: flex;
  justify-content: space-around;
  width: 6.25rem;
}

.navbar .van-nav-bar .van-icon {
  color: #000;
}
</style>